<template>
	<view>
		<view :style="'background-image: url('+get_img+sys.game_bg+');'" class="image"></view>
		<view class="title" style="padding-top: 60rpx;" @click="get_age">游戏中心</view>
		<view style="width: 750rpx;height: 800rpx;">
			<!-- #ifdef MP-WEIXIN -->
			<view @click="nav('/pages/prize/prize')"  style="background-color: #fff;width: 300rpx;height: 300rpx;margin: 50rpx 50rpx 0 50rpx;float: left;border-radius: 50rpx 0 50rpx 0;">
				<image :src="get_img+sys.active_draw_icon" style="width: 100%;height: 100%;border-radius: 50rpx 0 50rpx 0;"></image>
			</view>
		<!-- 	#endif -->
			<view @click="nav('/pages/chick/chick')" style="background-color: #006400;width: 300rpx;height: 300rpx;float: right;margin: 50rpx 50rpx 0 0;border-radius: 0 50rpx 0 50rpx;">
				<image :src="get_img+sys.active_chick_icon" style="width: 100%;height: 100%;border-radius: 0 50rpx 0 50rpx;"></image>
			</view>
			<view @click="nav('/pages/blind_box/blind_box')"  style="background-color: #fff;width: 300rpx;height: 300rpx;margin: 50rpx 50rpx 0 50rpx;float: left;border-radius: 50rpx 0 50rpx 0;">
				<image :src="get_img+sys.bind_icon" style="width: 100%;height: 100%;border-radius: 50rpx 0 50rpx 0;"></image>
			</view>
			<view @click="nav('/pages/coupon/coupon')" style="background-color: #006400;width: 300rpx;height: 300rpx;float: right;margin: 50rpx 50rpx 0 0;border-radius: 0 50rpx 0 50rpx;">
				<image :src="get_img+sys.coupon_icon" style="width: 100%;height: 100%;border-radius: 50rpx 0 50rpx 0;"></image>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				num: 5,
				showAction: false,
				sys: {},
				search: "",
				actionStyle: {
					Color: "#fff"
				},
				get_img: this.$get_img,
				list: []
			}
		},
		onLoad() {
			this.sys = uni.getStorageSync("sys")
			this.get_data()
		},
		onReachBottom() {
			this.page++
			this.get_data()
		},
		methods: {
			searchs(){
				this.page=1
				this.list=[]
				this.get_data()
			},
			get_data() {
				this.showAction = false
				let that = this
				this.$model.get("user/common/get_active?page=" + this.page + "&num=" + this.num+"&search="+this.search).then(res => {
					if (res.code == 200) {
						res.data.data.forEach(function(value) {
							that.list.push(value)
						})
					}
				})
			},
			infor(item) {
	
				uni.setStorageSync("active",item)
				uni.navigateTo({
					url: "../list/list?type=active"
				})
			}
		}
	}
</script>

<style>
	.image1 {
		width: 100rpx;
		height: 100rpx;
	}
	
	.image{
		background-repeat: no-repeat;
		background-size: 100% 100%;
		background-attachment: fixed;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100vh;
		z-index: -1;
	}

	
	.title {
		color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		letter-spacing: 10rpx;
		font-size: 45rpx;
	}

	.infor {
		background-color: rgba(255, 255, 255, .5);
		margin: 50rpx 100rpx 50rpx;
		width: 550rpx;
		height: 150rpx;

	}

	.infor_ {
		margin-top: 20rpx;
		/* background-color: rgba(0, 0, 0, .1); */
		width: 410rpx;
		float: right;
		color: #fff;
		/* font-size: 26rpx; */
	}

	.infor_ p {
		font-size: 30rpx;

	}

	.active {
		font-size: 26rpx;
		margin-top: 20rpx;
	}
</style>
